import { ProTableInstance } from "@/components/ProTable/interface";
import { ProTableInstance2 } from "@/components/ProTable2/interface";

export interface typeStatus {
  message: "success" | "warning" | "error";
  // 操作标识
  operationFlag: "add" | "edit" | "detail" | "particular" | "default" | "addTo" | "reportForWork" | "allot" | "move" | "";
  colorStatus: "success-box" | "warning-box" | "error-box";
  materialScope: "来料物" | "分拣产出物" | "撕碎产出物" | "粉碎产出物" | "";
  // 产出类型
  outType: "正常品" | "返工品";
  // 班别类型
  classType: "白班" | "晚班";
  smashWarehouse: "标准成品仓" | "其他成品仓" | "返工仓";
  qcType: "OK" | "NG";
}

export interface Methods<T = any> {
  skipParams?: (flag: typeStatus["operationFlag"], row: T | any) => void;
}

export interface SegmentedControl {
  children: Array<String>;
  current: number;
}

// 未知的对象
export interface UnknownObjProps {
  [key: string]: any;
}

// 表格ref
export interface ProTableValue {
  value?: ProTableInstance | undefined;
}

// 表格ref
export interface ProTableValue2 {
  value?: ProTableInstance2 | undefined;
}

export interface BasicSearchForm {
  weight: string;
  id?: string | number;
  sourceId?: string | number;
  line?: any;
}

export interface OtherDetailParams {
  count: number;
  sum: number;
  group: groupProp[];
}
export interface groupProp {
  key: string;
  value: string;
}

export interface defaultParams {
  id: number;
}

export interface defaultDateParams {
  dateScope: string;
}

export interface defaultDateParams2 {
  startTime: string;
  endTime: string;
}
